using ASP;
using HoWave.Common;
using System;
using System.Web;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI;
public class Admin_Admin_MenuRight : Page, IRequiresSessionState
{
	protected string isright
	{
		get
		{
			string result;
			if (!StaticFun.IsNeedCheckIdentifyRegCode)
			{
				result = "1";
			}
			else
			{
				result = this.getright();
			}
			return result;
		}
	}
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
	}
	private string getright()
	{
		Random random = new Random();
		int num = random.Next(99);
		bool flag = num < 20;
		bool flag2;
		if (flag)
		{
			flag2 = Certify.CheckIdentifyRegCode();
			HttpContext.Current.Cache.Insert("isright", flag2, null, DateTime.Now.AddHours(2.0), TimeSpan.Zero);
		}
		else
		{
			if (HttpContext.Current.Cache["isright"] == null)
			{
				flag2 = Certify.CheckIdentifyRegCode();
				HttpContext.Current.Cache.Insert("isright", flag2, null, DateTime.Now.AddHours(2.0), TimeSpan.Zero);
			}
			else
			{
				flag2 = (HttpContext.Current.Cache["isright"].ToString() == "True");
			}
		}
		return flag2 ? "1" : "0";
	}
}
